/**
 * Created by ClearLiang on 2019/4/22
 * Function:
 * Desc:
 */
import React, {Component} from 'react';
import {StyleSheet, View} from 'react-native';

export default class CardView extends Component {

    // 初始化state
    constructor(props) {
        super(props);
        this.state = {};
    }

    // 加载后
    componentDidMount(): void {
        console.log('componentDidMount')
    }

    // 移除前
    componentWillUnmount(): void {
        console.log('componentWillUnmount')
    }

    render() {

        return (
            <View style={[styles.body,this.props.style1]}>
                {this.props.children}
            </View>

        );
    }
}

// 构建样式
const styles = StyleSheet.create({
    body: {
        margin:15,
        padding:15,
        borderRadius:10,
        backgroundColor:'#FFFFFF',
    },

});
